package com.lagou.controller;

import com.lagou.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @AUTHOR: yb.feng
 * @DATE: 2020/7/1 20:33
 * @DESC:
 */
@RestController
@RequestMapping("/api")
public class EmailController {

    @Autowired
    private EmailService emailService;

    @RequestMapping("/email/{email}/{code}")
    public boolean sendEmail(@PathVariable String email, @PathVariable String code){
        emailService.sendEmail(email, code);
        return true;
    }
}
